/*
 * Copyright (c) 2023, 2024,yzc.cn All rights reserved.
 *
 */
package cn.yzc.controller;

import cn.yzc.dto.SysUserDto;
import cn.yzc.mgr.SysUserMgr;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yui.comn.hub.extension.controller.Controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>Project: mybatis-linkDemo - SysUserController</p>
 * <p>Powered by yzc On 2024-05-15 15:12:17</p>
 * <p>描述：<p>
 *
 * @author yzc [youzhicheng0415@163.com]
 * @version 1.0
 * @since 17
 */

@RestController
public class SysUserController extends Controller {

    @Autowired
    SysUserMgr sysUserMgr;


    @RequestMapping("/list")
    public Object queryUserName(){
        List<SysUserDto> list = sysUserMgr.listUserARole();
        return buildList(list,"USER_ROLE");
    }


    @RequestMapping("/hello")
    public Map<String,Object> hello(){
        System.out.println("你好");
        Map<String,Object> map = new HashMap<>();
        map.put("code","200");
        map.put("message","请求成功");
        map.put("data","你好");
        return map;
    }

}
